//
// CLandscapeIGManager.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CLandscapeIGManager {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CLandscapeIGManager(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CLandscapeIGManager obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CLandscapeIGManager(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CLandscapeIGManager() {
    this(nel3dJNI.new_CLandscapeIGManager(), true);
  }

  public void initIG(UScene scene, String igDesc, UDriver driver, long selectedTexture, SWIGTYPE_p_NLMISC__IProgressCallback callBack) {
    nel3dJNI.CLandscapeIGManager_initIG(swigCPtr, this, UScene.getCPtr(scene), scene, igDesc, UDriver.getCPtr(driver), driver, selectedTexture, SWIGTYPE_p_NLMISC__IProgressCallback.getCPtr(callBack));
  }

  public UInstanceGroup loadZoneIG(String name) {
    long cPtr = nel3dJNI.CLandscapeIGManager_loadZoneIG(swigCPtr, this, name);
    return (cPtr == 0) ? null : new UInstanceGroup(cPtr, false);
  }

  public void loadArrayZoneIG(Vector_String names, SWIGTYPE_p_std__vectorT_NL3D__UInstanceGroup_p_t dest) {
    nel3dJNI.CLandscapeIGManager_loadArrayZoneIG__SWIG_0(swigCPtr, this, Vector_String.getCPtr(names), names, SWIGTYPE_p_std__vectorT_NL3D__UInstanceGroup_p_t.getCPtr(dest));
  }

  public void loadArrayZoneIG(Vector_String names) {
    nel3dJNI.CLandscapeIGManager_loadArrayZoneIG__SWIG_1(swigCPtr, this, Vector_String.getCPtr(names), names);
  }

  public void unloadZoneIG(String name) {
    nel3dJNI.CLandscapeIGManager_unloadZoneIG(swigCPtr, this, name);
  }

  public void unloadArrayZoneIG(Vector_String names) {
    nel3dJNI.CLandscapeIGManager_unloadArrayZoneIG(swigCPtr, this, Vector_String.getCPtr(names), names);
  }

  public boolean isIGAddedToScene(String name) {
    return nel3dJNI.CLandscapeIGManager_isIGAddedToScene(swigCPtr, this, name);
  }

  public UInstanceGroup getIG(String name) {
    long cPtr = nel3dJNI.CLandscapeIGManager_getIG(swigCPtr, this, name);
    return (cPtr == 0) ? null : new UInstanceGroup(cPtr, false);
  }

  public void reset() {
    nel3dJNI.CLandscapeIGManager_reset(swigCPtr, this);
  }

  public void reloadAllIgs() {
    nel3dJNI.CLandscapeIGManager_reloadAllIgs(swigCPtr, this);
  }

  public void getAllIG(SWIGTYPE_p_std__vectorT_NL3D__UInstanceGroup_p_t dest) {
    nel3dJNI.CLandscapeIGManager_getAllIG(swigCPtr, this, SWIGTYPE_p_std__vectorT_NL3D__UInstanceGroup_p_t.getCPtr(dest));
  }

  public void getAllIGWithNames(SWIGTYPE_p_std__vectorT_std__pairT_NL3D__UInstanceGroup_p_std__string_t_t dest) {
    nel3dJNI.CLandscapeIGManager_getAllIGWithNames(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__pairT_NL3D__UInstanceGroup_p_std__string_t_t.getCPtr(dest));
  }

}
